package com.springcloud.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.springcloud.common.core.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 系统用户
 * </p>
 *
 * @author mori
 * @since 2019-10-31
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class SystemUser extends BaseEntity<SystemUser> {

    private static final long serialVersionUID = 1L;

    /**
     * 系统用户主键
     */
    @TableId(value = "system_user_id", type = IdType.AUTO)
    private Integer systemUserId;

    /**
     * 默认仓库ID
     */
    private Integer warehouseId;

    /**
     * 默认客服系统ID
     */
    private Integer customerServiceCenterId;

    private Integer defaultRoleId;

    private Integer currentWarehouseId;

    private Integer currentCustomerServiceCenterId;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 密码
     */
    private String password;

    /**
     * 性别 0=保密/1=男/2=女
     */
    private Boolean gender;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 最后登录时间
     */
    private LocalDateTime lastLoginTime;

    /**
     * 最后登录IP
     */
    private String lastLoginIp;

    /**
     * 头像缩略图地址
     */
    private String avatarUrl;

    /**
     * 状态  0：禁用   1：正常
     */
    private Integer statusId;

    /**
     * 备注
     */
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.systemUserId;
    }

}
